refactor: migrate protocol + docs tooling into buddy commands#2168
Merged
Conversation
Per Chris: reusable tooling should be discoverable behind `buddy`, not loose
scripts. Move the protocol governance + docs-freshness tooling out of
.github/scripts and expose it as `buddy protocol:*` (16 commands) and
`buddy docs:*` (6). The protocol suite/evidence data stays under
.github/protocol; the pre-install / CI-internal glue (check-lockfile-version,
check-dependency-commits, deploy/resolve-target) stays as scripts.
- .github/scripts/{protocol,docs} -> app/Commands/{protocol,docs}. Same depth,
so root + framework-import paths are unchanged; sync-suite.test.ts's combined
`../../protocol` ref needed one more `../` since app/Commands and
.github/protocol are not siblings.
- Each tool's `if (import.meta.main)` body extracted to `export run()`; a
runTool() helper swaps process.argv so each tool's existing --check/--write
parsing works unchanged.
- app/Commands/{Protocol,Docs}.ts register the commands; package.json + CI now
invoke `buddy <cmd>`.
Verified: every command runs; protocol:conformance 15/37; moved tests 48/0;
lint clean. The manifest/desktop/craft/docs:buddy checks fail only locally
(missing rfcs git object, env-dependent evidence, machine-path doc noise),
identical on origin/main and green in CI.
glennmichael123
force-pushed
the
refactor/scripts-to-buddy-commands
branch
from
July 24, 2026 08:04
444c3dc to
eb7a3d8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per Chris - reusable tooling should be discoverable behind
buddy, not loose scripts. Full migration of the protocol governance + docs-freshness tooling out of.github/scriptsand into the buddy CLI.What
.github/scripts/{protocol,docs}→app/Commands/{protocol,docs}, exposed as 16buddy protocol:*+ 6buddy docs:*commands.suite/evidence/reports) stays under.github/protocol.check-lockfile-version(runs beforebun install),check-dependency-commits,deploy/resolve-target.How
../../../storageframework-import paths are unchanged. The one exception the fork caught:sync-suite.test.ts's combined../../protocolref needed one more../(app/Commands and .github/protocol aren't siblings, unlike the .github relocation).if (import.meta.main)body →export run(); a smallrunTool()swapsprocess.argvso each tool's existing--check/--writeparsing works untouched.app/Commands/{Protocol,Docs}.tsregister the commands (both flag modes each);package.json(22 scripts) +ci.yml/desktop-lifecycle.ymlnow invokebuddy <cmd>.Verification (independently re-run, not just the fork's word)
buddy protocol:conformance→ 15 pass / 32 skipped; moved tests 48/0; lint clean; zero lingering.github/scripts/{protocol,docs}refs.protocol:manifest:check,:desktop:check,:craft:check,docs:buddy:check) fail identically on origin/main - missing rfcs git object, env-dependent evidence, machine-path doc noise - and are green in CI. Confirmed the migration changed no evidence-generating logic (only a usage-hint string).🤖 Generated with Claude Code